package thread;

import java.io.StringReader;
import java.util.regex.Pattern;

public class ThreadDemoA {
	
	private void outerMethod(String value) {
		String v = value;
		for(int i = 0 ; i < 10; i++) {
			v += value;
		}
	}
	
	private int outerMethod(int value) {
		int count = value;
		for(int i = 0 ; i < 10; i++) {
			value ++;
		}
		return count;
	}
	
	public static void main(String[] args) {
		String n = System.in.toString();
		MyThread m1 = new ThreadDemoA().new MyThread("MyThread1");
		m1.start();
		MyThread m2 = new ThreadDemoA().new MyThread("MyThread2");
		m2.start();
	}
	
	public class MyThread extends Thread {
		private String value;
		private int count;
		public MyThread(String value) {
			this.value = value;
		}
		
		public void run() {
			this.count = outerMethod(this.count);
		}
		
		public int getCount(){
			return this.count;
		}
	}
	
}
